home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-11 / pdrd2.zip / RD.ZIP / RD_DEMO6.PRG < prev    next >
Text File  |  1993-01-11  |  1KB  |  48 lines

  1. /*
  2.     RD_DEMO6.PRG
  3.  
  4.     This demonstrates the use of:
  5.     1.  ADr_again() - resurrects an exited Read.
  6.     2.  The return value of ADread().
  7. */
  8.  
  9. #include "read.ch"
  10.  
  11. //---------
  12. func main()
  13. local getlist[0]
  14. local cShort := "Short string"
  15. local cLong := "This is a very long string.  It is '@S PICTUREd'.  This is the last of three sentences."
  16. local nT := 10, nL := 10, nB := 13, nR := 50
  17. local cColor := setcolor( if( iscolor(), "W+/BG, GR+/R,,, N/R", nil ) )
  18. local aScn, aScn2, aReadRetval
  19. #define DO_NOT_KILL     .f.
  20. #define READ_ENGINE     aReadRetval[1]
  21.  
  22. cls
  23. aScn = ADbox( nT, nL, nB, nR )
  24. aScn2 = ADmessage( { "This example will demonstrate how to reactivate an exited Read"},;
  25.                      20,, .f., .f. )
  26. @nT+1, nL+2 say "Short String" adget cShort
  27. @nT+2, nL+2 say "Long String " adget cLong picture "@S24"
  28. aReadRetval = ADread( getlist,,, DO_NOT_KILL )
  29. ADrestscn( aScn2 )
  30. aScn = ADrestscn( aScn )
  31. ADmessage( {;
  32.              "You have exited the Read.  The Read engine, however, continues to 'live'.",;
  33.              "You may re-activate it any time you want to.  In this demo, we will",;
  34.              "do that as soon as you press any key.  The reactivated Read, by default,",;
  35.              "will consist of empty Gets, and Get #1 will have the initial focus. ";
  36.            },18 )
  37. aScn = ADrestscn( aScn )
  38. ADr_again( READ_ENGINE )
  39. ADrestscn( aScn )
  40. setcolor( cColor )
  41. return nil
  42.  
  43.  
  44.  
  45.  
  46.  
  47.  
  48.